﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SEO_IP.aspx.cs" Inherits="Web.SEO_IP" %>

<%@ Register Assembly="Control" Namespace="Com.Control" TagPrefix="cc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>恶意IP统计</title>
    <link href="css/Page.css" rel="stylesheet" type="text/css" />

    <script type="text/javascript" src="js/My97DatePicker/WdatePicker.js"></script>

    <script type="text/javascript" src="../common/Js/base.js"></script>

    <link href="js/src/tip-yellowsimple/tip-yellowsimple.css" rel="stylesheet" type="text/css" />

    <script src="js/jquery-1.4.2.min.js" type="text/javascript"></script>

    <script src="js/src/jquery.poshytip.js" type="text/javascript"></script>

    <script type="text/javascript">

        function test(id, ip) {
            var ajax = new Ajax("xy011", "&id=" + id + "&ip=" + ip);
            ajax.onSuccess = function() {
                var strhtml = "";
                if (ajax.state.result == 0 || ajax.state.result == -1) {

                } else {

                    $("#getdata" + id).css("color", "red");//给字体添加颜色
                }
                strhtml = "<table >";
                strhtml += "<tr>";
                strhtml += "<td >时   间</td>";
                strhtml += "<td >关键词</td>";
                strhtml += "</tr>";

                for (var i = 0; i < ajax.data.item.length; i++) {
                    strhtml += "<tr>";

                    strhtml += "<td >";
                    strhtml += ajax.data.item[i].datatime;
                    strhtml += "</td>";

                    strhtml += "<td >";
                    strhtml += ajax.data.item[i].keyword;
                    strhtml += "</td>";
                    strhtml += "</tr>";
                }
                strhtml += "</table>";
              
                $('#getdata' + id).poshytip({
                    content: strhtml, //提示消息内容
                    className: 'tip-yellowsimple',
                    showTimeout: 1,
                    alignTo: 'target',
                    alignX: 'center',
                    offsetY: 5,
                    allowTipHover: false
                });


            }
        }
    
    </script>

</head>
<body>
    <form id="form1" runat="server">
    <table style="border: 1px solid #9abddd;" border="0" cellpadding="0" cellspacing="0"
        width="98%">
        <tr>
            <td class="TitleBar" colspan="3" align="center">
                恶意IP统计
            </td>
        </tr>
        <tr>
            <td class="Pager" colspan="2" style="padding-right: 10px; text-align: left;">
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;IP：<asp:TextBox ID="txtIP" runat="server"></asp:TextBox>
                搜索引擎：
                <asp:DropDownList ID="ddlStatus" runat="server" OnSelectedIndexChanged="ddlStatus_SelectedIndexChanged">
                </asp:DropDownList>
                地区：
                <asp:DropDownList ID="ddlarea" runat="server">
                </asp:DropDownList>
                <asp:Button ID="btn_search" runat="server" Text="查询" OnClick="btn_search_Click" />
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;数据源总数：<span style="color: #cd0000;"><%=Count%></span>
            </td>
            <td class="Pager" style="padding-right: 10px; text-align: right;">
                <span style="color: #cd0000; font-size: 14px;">请下载表格查看具体详情</span>
                <asp:Button ID="btn_download" runat="server" Text="数据下载" OnClick="btn_download_Click" />
            </td>
        </tr>
        <tr>
            <td class="Pager" colspan="3" style="padding-right: 10px; text-align: left;">
                &nbsp;&nbsp; 开始时间：&nbsp;&nbsp;<asp:TextBox ID="BeginDataTime" runat="server" onclick="new WdatePicker({dateFmt:'yyyy-MM-dd'});"
                    TabIndex="10" Width="85px"></asp:TextBox>
                &nbsp;&nbsp; 结束时间：&nbsp;&nbsp;<asp:TextBox ID="EndDataTime" runat="server" onclick="new WdatePicker({dateFmt:'yyyy-MM-dd'});"
                    TabIndex="11" Width="85px"></asp:TextBox>
                &nbsp;&nbsp;
            </td>
        </tr>
        <tr>
            <td class="MenuItem" style="text-align: center;">
                IP
            </td>
            <td class="MenuItem" style="text-align: center;">
                重复次数
            </td>
            <td class="MenuItemRight" style="text-align: center;">
                操作
            </td>
        </tr>
        <asp:Repeater ID="repeater" runat="server" OnItemCommand="repeater_ItemCommand" 
            onitemdatabound="repeater_ItemDataBound">
            <ItemTemplate>
                <tr style='background-color: <%#(Container.ItemIndex%2==0)?"write":"#f5f5f5;"%>' runat="server" id="row">
                    <td class="RecordItem" style="text-align: center; width: 280px;">
                        <a id="getdata<%#Eval("RNum") %>" onmouseover="test('<%#Eval("RNum") %>','<%#Eval("IP")%>')">
                            <%#Eval("IP")%></a></b>
                    </td>
                    <td class="RecordItem" style="text-align: center;">
                        <%#Eval("重复次数")%></b>
                    </td>
                    <td class="RecordItemRight" style="text-align: center; font-size: 12px;">
                        <a class="Link" href="SEO_ipdetail.aspx?ip=<%#Eval("IP")%>" target="_blank" style="font-size: 12px;">
                            查看详细</a>
                    </td>
                </tr>
            </ItemTemplate>
        </asp:Repeater>
        <tr>
            <td colspan="3" align="center">
            </td>
        </tr>
    </table>
    </form>
</body>
</html>
